package test.no2;

import java.util.LinkedList;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		LinkedList<INT> integers=new LinkedList<>();
		Scanner scanner=new Scanner(System.in);
		int size;
		System.out.println("Please Enter the size");
		size=scanner.nextInt();
		for (int index=0;index<size;index++){
			integers.add(new INT(index));
		}
		System.out.println("Please enter node and number to add");
		integers.add(
				scanner.nextInt(),
				new INT(scanner.nextInt())
		);
		for(INT integer:integers){
			System.out.print(integer);
		}
	}
}
class INT{
	int num;
	INT(int num){
		this.num=num;
	}

	@Override
	public String toString() {
		return this.num+" ";
	}
}

